import request from '@/utils/request'

// 查询脚本分享列表
export function listShares(query) {
  return request({
    url: '/shares/shares/list',
    method: 'get',
    params: query
  })
}

// 查询脚本分享详细
export function getShares(username) {
  return request({
    url: '/shares/shares/' + username,
    method: 'get'
  })
}

// 新增脚本分享
export function addShares(data) {
  return request({
    url: '/shares/shares',
    method: 'post',
    data: data
  })
}

// 修改脚本分享
export function updateShares(data) {
  return request({
    url: '/shares/shares',
    method: 'put',
    data: data
  })
}

// 删除脚本分享
export function delShares(username) {
  return request({
    url: '/shares/shares/' + username,
    method: 'delete'
  })
}
